import csv

file="1.csv"
with open(file,'w',newline='') as fp:
    writer = csv.writer(fp)
    writer.writerow(['id','name','age'])
    writer.writerow(['10001','Mike',20])
    writer.writerow(['10002','Bob',22])
    writer.writerow(['10003','Jordan',21])